package drh.dao;

import java.io.IOException;
import java.util.Properties;

import javax.sql.DataSource;

import org.apache.commons.dbutils.QueryRunner;

import com.alibaba.druid.pool.DruidDataSourceFactory;

public class BaseDao {
	public static QueryRunner query = null;
	static {		
			try {
				Properties properties = new Properties();
				properties.load(BaseDao.class.getResource("/config.propertie").openStream());
				DataSource ds = DruidDataSourceFactory.createDataSource(properties);
				query = new QueryRunner(ds);
			} catch (Exception e) {			
				e.printStackTrace();
			}	
	}
}
